<?php
$path = CMF_ROOT . "data/config/";
$v = "fth5";
$file = "recharge.json";
$fileName = $path . $v . '/' . $file;
$data = json_decode(file_get_contents($fileName), true);
$charge_config = [];
foreach ($data as $class => $subList) {
    foreach ($subList as $sub) {
        $key = $class . "_" . $sub["type"];
        $charge_config[$key] = $sub;
    }
}

return $charge_config;